package com.yb.personelmanagement.domain.System;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @Auther: lzx
 * @Date: 2019/8/8 09:43
 * @Description:权限
 */
@Entity
public class Permission {

	public Permission() {
		super();
	}

	public Permission(Long id, Long parentId, String permission, String description) {
		super();
		this.id = id;
		this.pId = parentId;
		this.permission = permission;
		this.description = description;
	}

	/**
	 * 权限编号 主键自增
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", columnDefinition = "bigint(20)  comment'主键自增'")
	private Long id;

	/**
	 * 父节点id
	 */
	@Column(name = "pid", columnDefinition = "bigint(20)  comment'父节点id'")
	private Long pId;

	/**
	 * 权限名称
	 */
	@Column(name = "permission", columnDefinition = "varchar(100)  comment'权限名称'")
	private String permission;

	/**
	 * 权限描述
	 */
	@Column(name = "description", columnDefinition = "varchar(100)  comment'权限描述'")
	private String description;


	@Column(name = "siteLevel", columnDefinition = "int(10)  comment'节点级别'")
	private Integer siteLevel;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public Long getpId() {
		return pId;
	}

	public void setpId(Long pId) {
		this.pId = pId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getSiteLevel() {
		return siteLevel;
	}

	public void setSiteLevel(Integer siteLevel) {
		this.siteLevel = siteLevel;
	}

	public Permission(Long id, Long pId, String permission, String description, Integer siteLevel) {
		super();
		this.id = id;
		this.pId = pId;
		this.permission = permission;
		this.description = description;
		this.siteLevel = siteLevel;
	}

}
